#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

int main() {
    int a = 0;
    int b = 0;
    int k = 0;
    scanf("%d:%d %d", &a, &b, &k);
    a = (a + (b + k) / 60) % 24;
    b = (b + k) % 60;
    printf("%02d:%02d", a, b);
    return 0;
}